22 template <class T
> string
toStr(const T
&x
){ stringstream s
; s
<< x
; return s
.str(); }
23 template <class T
> int toInt(const T
&x
){ stringstream s
; s
<< x
; int r
; s
>> r
; return r
; }
25 #define For(i, a, b) for (int i=(a); i<(b); ++i)
26 #define foreach(x, v) for (typeof (v).begin() x = (v).begin(); x != (v).end(); ++x)
27 #define D(x) cout << #x " = " << (x) << endl
31 point(){} point(double x
, double y
) : x(x
), y(y
) {}
32 const point
perp() const{
35 point
operator - (const point
&t
) const{
36 return point(x
- t
.x
, y
- t
.y
);
38 point
operator + (const point
&t
) const{
39 return point(x
+ t
.x
, y
+ t
.y
);
41 point
operator / (double t
) const{
42 return point(x
/ t
, y
/ t
);
46 point
circle3points(const point
&a
, const point
&b
, const point
&c
){
51 double x0
, y0
, x1
, y1
, x2
, y2
;
52 while (scanf("%lf%lf%lf%lf%lf%lf", &x0
, &y0
, &x1
, &y1
, &x2
, &y2
)==6){
53 point
a(x0
, y0
), b(x1
, y1
), c(x2
, y2
);